package com.common.util;

import org.apache.commons.fileupload.FileItem;

public class SaveImg extends Thread{

	FileItem fileitem;
	String path;
	String fileName;

	public SaveImg(FileItem fileitem, String path, String fileName) {
		this.fileitem = fileitem;
		this.path = path;
		this.fileName = fileName;
	}

	@Override
	public void run() {
		try {
			ImageUtil.processUploadFile(fileitem, path, fileName);// 直接存储
			//ImageUtil.processUploadFileGenerateSmall(fileitem, path, fileName); // 超过1M压缩
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
